Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mqtt.homeassistant] Use a single channel for all scenes on a device #18262

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Feb 13, 2025

It accepts either object ID, or scene name (assuming the latter doesn't conflict with the former). Command descriptions are fully populated. You also no longer need to deal with sending the payload_on.

Merging components is refactored slightly, now that multiple component types do it.

Closes #18259

It accepts either object ID, or scene name (assuming the latter doesn't
conflict with the former). Command descriptions are fully populated.
You also no longer need to deal with sending the payload_on.

Merging components is refactored slightly, now that multiple component
types do it.

Signed-off-by: Cody Cutrer <[email protected]>
@ccutrer ccutrer added enhancement An enhancement or new feature for an existing add-on (potentially) not backward compatible labels Feb 13, 2025
@ccutrer ccutrer requested a review from antroids as a code owner February 13, 2025 19:28
@ccutrer
Copy link
Contributor Author

ccutrer commented Feb 13, 2025

My item: String TheaterLights_Scene { channel="mqtt:homeassistant:mosquitto:zigbee2mqtt_5F1221051039810110150109113116116_5F14:scene" }

In MainUI:
Screenshot 2025-02-13 at 1 43 04 PM

In BasicUI, with this sitemap:

sitemap test label="Test" {
  Switch item=TheaterLights_Scene
}
Screenshot 2025-02-13 at 1 43 23 PM

So it's properly picking up the command description. From rules, I can send either "scene_1" or "House" as the command, and both get translated to the proper JSON when sent to MQTT.

Copy link
Contributor

@lsiepel lsiepel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM.
I guess this would warrant for an upgrade notice in the distro, could you create a PR?

@lsiepel lsiepel merged commit 1856aa9 into openhab:main Feb 18, 2025
2 checks passed
@lsiepel lsiepel added this to the 5.0 milestone Feb 18, 2025
ccutrer added a commit to ccutrer/openhab-distro that referenced this pull request Feb 18, 2025
@ccutrer ccutrer deleted the mqtt-homeassistant-merge-scenes branch February 18, 2025 15:22
@ccutrer
Copy link
Contributor Author

ccutrer commented Feb 18, 2025

Yup, openhab/openhab-distro#1724.

@openhab-bot
Copy link
Collaborator

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/suggestion-for-openhab-4-3-home-assistant-mqtt-scenes-in-single-channel/161226/14

holgerfriedrich pushed a commit to openhab/openhab-distro that referenced this pull request Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on (potentially) not backward compatible
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[mqtt.homeassistant] Collapse scenes into a single channel
3 participants